home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20000114-20000217 / 000103_news@columbia.edu _Thu Jan 20 18:26:34 2000.msg < prev    next >
Internet Message Format  |  2020-01-01  |  7KB

  1. Return-Path: <news@columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
  3.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id SAA15105
  4.     for <kermit.misc@watsun.cc.columbia.edu>; Thu, 20 Jan 2000 18:26:34 -0500 (EST)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id SAA12298
  7.     for kermit.misc@watsun.cc.columbia.edu; Thu, 20 Jan 2000 18:23:19 -0500 (EST)
  8. X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
  9. From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
  10. Subject: Case Study #12: C-Kermit's Telnet Client
  11. Date: 20 Jan 2000 23:23:13 GMT
  12. Organization: Columbia University
  13. Message-ID: <8685d1$c07$1@newsmaster.cc.columbia.edu>
  14. To: kermit.misc@columbia.edu
  15.  
  16.  
  17. These days it seems that blessings are always mixed.  Everything's a
  18. tradeoff.  The evolution of the Telnet protocol is no exception.  Primarily
  19. to accommodate modern demands for security, the original simple protocol set
  20. forth in RFC854 (1983) is no longer sufficient.  C-Kermit 7.0 includes a
  21. fully modern Telnet implementation, complete with tradeoffs.
  22.  
  23. On the plus side, the C-Kermit Telnet client can handle authentication
  24. securely using any of several different authentication methods, and it can
  25. also encrypt your session and it can verify the identity of the host you are
  26. connecting to (more about this in future installments).
  27.  
  28. On the minus side, initial connection can take a bit longer than before
  29. because there's more to negotiate, and because of the time taken by reverse
  30. Domain Name Service (DNS) lookups, which client and/or server might
  31. initiate.  Sometimes connections can take a LOT longer.  The most common
  32. causes of long delays are:
  33.  
  34.  . The reverse DNS lookup done by the target host.  If the computer you
  35.    are Telnetting from is not registered in DNS, the host might wait a
  36.    minute or two before deciding it's not going to get an answer to its
  37.    DNS lookup.  The same thing happens no matter what Telnet client you
  38.    use.  The only remedy is to ensure your computer is registered in DNS.  
  39.  
  40.  . The reverse DNS lookup done by C-Kermit itself.  As above but in the
  41.    other direction.  C-Kermit's lookup not only checks the host's identity
  42.    but identifies which host you have actually reached in case the address
  43.    you gave was that of a host pool.  But if this service prevents you
  44.    from making the connection at all, or makes the process intolerably
  45.    slow, you can suppress it with SET TCP REVERSE-LOOKUP OFF; the tradeoff
  46.    is that you might not know which host you actually reached.
  47.  
  48.  . The Telnet server is not replying to messages that require a reply.
  49.    This tends to occur mainly with older Telnet servers, but also can
  50.    happen with new ones that are improperly coded.  In this case, Kermit
  51.    eventually times out after several minutes and tells you what went
  52.    wrong so you can fix or work around the problem.  Or you can you can
  53.    (at your own risk) include the new /NOWAIT switch in your TELNET or
  54.    SET HOST command:
  55.  
  56.      C-Kermit> telnet /nowait oldmini.xyzcorp.com
  57.  
  58.    The risk is that client and server might have conflicting ideas about
  59.    certain parameters are supposed to agree, which can result in fractured
  60.    sessions (or worse if you are trying to make a secure connection; more
  61.    about this in a future posting).
  62.  
  63. These hints should get you past any new difficulties you might have
  64. experienced when upgrading to C-Kermit 7.0 from prior versions.  Of course
  65. there is much more to tell.  C-Kermit's Telnet protocol intepreter has been
  66. entirely redesigned and recoded to handle most modern options, and to give
  67. you total and detailed control over negotiation policies and actions for
  68. each option.  It also offers expanded debugging capabities for
  69. troubleshooting.  The full story can be found in:
  70.  
  71.   ftp://kermit.columbia.edu/kermit/f/telnet.txt
  72.  
  73. Before leaving the topic of Telnet, let's recall some of the advantages
  74. of C-Kermit over the regular System Telnet client on Unix, VMS, etc:
  75.  
  76.  . It is more configurable than System Telnet.
  77.  . It can transfer files over the Telnet connection.
  78.  . It can translate character sets.
  79.  . It can be scripted.
  80.  . It can also be used for other kinds of connections.
  81.  
  82. And so on.  Given the advantages, why not not use C-Kermit as your only
  83. Telnet client?  One answer might be "because the command-line syntax is
  84. different."  For example, maybe you have a Web browser whose "helper" for
  85. Telnet links is hardwired to be System Telnet, with a command line like:
  86.  
  87.   telnet host [ port ]
  88.  
  89. No worries!  C-Kermit 7.0 has a new feature called "command line
  90. personalities", one of which is "telnet".  Watch this (Unix example):
  91.  
  92.   $ whereis telnet
  93.   /usr/bin/telnet
  94.   $ cd /usr/bin
  95.   $ mv telnet systemtelnet
  96.   $ ln -s /usr/local/bin/kermit telnet
  97.  
  98. (The same effect is achieved if you leave System Telnet alone, but place
  99. the telnet -> kermit link ahead of System Telnet in the PATH.)
  100.  
  101. Now C-Kermit *is* Telnet and it responds to the regular Telnet command line:
  102.  
  103.   telnet host [ port ]
  104.  
  105. as System Telnet would.  And, like System Telnet, if you invoke it this way,
  106. it exits automatically when the connection is closed.  But unlike Telnet,
  107. you can still use it to transfer files, execute scripts, and all the rest.
  108. For more information about command-line personalities, see Section 9.1 of
  109. ckermit2.txt.
  110.  
  111. Finally, a word about scripting Telnet connections.  If the Telnet server
  112. supports the Telnet protocol feature that lets the client supply your user
  113. ID automatically, you might find that a login: (Username:, etc) prompt is
  114. not issued; the server goes straight to the Password prompt.  Alternatively,
  115. (and even more confusingly) it might print the login or username prompt, but
  116. then fill in your username for you and then print the Password prompt.  In
  117. case your script was not expecting such behavior, you can prevent C-Kermit
  118. from sending your user ID to the server by including the following command
  119. in your script:
  120.  
  121.   set login userid
  122.  
  123. before the SET HOST command that makes the connection (you'll also need to
  124. do this if your user ID on the target is not the same as your local one).
  125. Then your old script should work as before.
  126.  
  127. You can also recode any Telnet script to adapt automatically to the presence
  128. or absence of a login: (Username:) prompt using MINPUT rather than INPUT.
  129. For a sample C-Kermit 7.0 Telnet "Kerbang script", see:
  130.  
  131.   ftp://kermit.columbia.edu/kermit/scripts/ckermit/autotelnet
  132.  
  133. in the C-Kermit scripts library.
  134.  
  135. - Frank